/**
 * 
 */
package cc.rico.jms.spring.listener;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author rico 2016年7月31日
 *
 */
public class ConsumerMessageListener implements MessageListener {
	private static final Logger logger = LoggerFactory.getLogger(ConsumerMessageListener.class);

	/* (non-Javadoc)
	 * @see javax.jms.MessageListener#onMessage(javax.jms.Message)
	 */
	@Override
	public void onMessage(Message message) {
		TextMessage msg = (TextMessage) message;
		try {
			logger.info("##ConsumerMessageListener.onMessage##message={}", msg.getText());
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}

}
